<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h4>插值表达式：{{count}}</h4>
        <h4>插值表达式：{{msg}}</h4>
        <span>v-text：<span v-text="msg"></span></span>
        <h3>v-model</h3>
        <input type="text" v-model="count">
        <input type="text" v-model="msg">
        <h3>v-html</h3> 
        <div v-html="msg" class="sd"></div> 
        <div v-on:click="toDetail">click事件</div>
    </div>
    <script src="./dep.js"></script>
    <script src="./watcher.js"></script>
    <script src="./compiler.js"></script>
    <script src="./observer.js"></script>
    <script src="./myVue.js"></script>
    <script>
        let vm = new myVue({
            el: '#app',
            data: {
                count: 1,
                msg: 'hello',
                obj: {}
            },
            methods: {
                toDetail () {
                    console.log('123');
                    this.obj.a = 'haha';
                }
            }
        });
    </script>
</body>
</html>